'use strict';
const db = uniCloud.database()
const coll = db.collection('user')
exports.main = async (event, context) => {

	let res = await coll.where({
		_id: event.id
	}).get()
	console.log('res', res)
	if (res.data[0].pic) {
		return {
			status: 1,
			pic: res.data[0].pic,
			msg: '已经生成票据'
		}
	} else {
		return {
			status: 0,
			msg: '暂无票据'
		}
	}


};
